home *** CD-ROM | disk | FTP | other *** search
-
-
-
- LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555)))) LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555))))
-
-
-
- NNNNAAAAMMMMEEEE
- libelfutil - library for xlate sections and leb128 numbers.
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<lllliiiibbbbXXXXllllaaaatttteeee....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ccccmmmmppppllllrrrrssss////lllleeeebbbb111122228888....hhhh>>>>
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- This library is a collection of functions which are perhaps best thought
- of as three groups: the xlate functions used to create and access the
- .MIPS.xlate and related sections, the leb128 functions, and a disassembly
- function (undocumented).
-
- The following is a description of the xlate routines. The xlate routines
- are used to create and access addresses translation data as described in
- _x_l_a_t_e(4).
-
- Calls used to create address translation data are called "producer"
- calls. Calls used to create applications that read the address
- translation data are called "consumer" calls.
-
- Use -lelfutil -lelf on the link command line to link in _l_i_b_e_l_f_u_t_i_l.
-
- All call interfaces described here pass and return values sufficient for
- both 32 and 64 bit executables and DSOs. On disk the data format is
- slightly different for 32 and 64 bit executables and DSOs but there is
- only one library interface.
-
- xxxxllllaaaatttteeee CCCCoooonnnnssssuuuummmmeeeerrrr IIIInnnntttteeeerrrrffffaaaacccceeee
- The xlate consumer interface is used by debuggers and other tools that
- wish to know, for a transformed executable or DSO, what given execution
- time addresses were in the original program text (executable
- instructions). Or that wish to know, for a given address taken from the
- debugging information, what address this represents in the transformed
- text (the debugging information is not changed by transformations, so the
- debugging information give addresses which are not identical to the
- executing transformed text).
-
- All code here ignores return values to keep the examples small.
-
- This example gets the untransformed address for a range of transformed
- addresses.
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555)))) LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555))))
-
-
-
- _iiii_nnnn_tttt _rrrr_eeee_ssss_uuuu_llll_tttt_;;;;
- _xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______cccc_oooo_nnnn _cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee _==== _0000_;;;;
- _xxxx_llll_aaaa_tttt_eeee______bbbb_llll_oooo_cccc_kkkk _rrrr_aaaa_nnnn_gggg_eeee_;;;;
- _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______iiii_nnnn_iiii_tttt______ffff_dddd_((((_mmmm_yyyy_oooo_pppp_eeee_nnnn_ffff_dddd_,,,,
- _XXXX_LLLL_AAAA_TTTT_EEEE______OOOO_PPPP_EEEE_NNNN______SSSS_TTTT_DDDD______TTTT_AAAA_BBBB_LLLL_EEEE_,,,,_&&&&_cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee_))))_;;;;
- _ffff_oooo_rrrr_((((_pppp_cccc _==== _ssss_tttt_aaaa_rrrr_tttt_pppp_cccc_;;;; _pppp_cccc _<<<<_eeee_nnnn_dddd_pppp_cccc_;;;; _pppp_cccc _++++_==== _4444_))))
- _{{{{
- _EEEE_llll_ffff_6666_4444______AAAA_dddd_dddd_rrrr _oooo_llll_dddd_aaaa_dddd_dddd_rrrr_eeee_ssss_ssss_;;;;
- _xxxx_llll_aaaa_tttt_eeee______BBBB_llll_oooo_cccc_kkkk _rrrr_aaaa_nnnn_gggg_eeee_;;;;
- _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______aaaa_dddd_dddd_rrrr_eeee_ssss_ssss_((((_cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee_,,,,
- _XXXX_LLLL_AAAA_TTTT_EEEE______AAAA_DDDD_DDDD_RRRR_EEEE_SSSS_SSSS______IIII_NNNN_PPPP_UUUU_TTTT______NNNN_EEEE_WWWW______AAAA_DDDD_DDDD_RRRR_EEEE_SSSS_SSSS_,,,,
- _pppp_cccc_,,,,_&&&&_oooo_llll_dddd_aaaa_dddd_dddd_rrrr_eeee_ssss_ssss_,,,,_&&&&_rrrr_aaaa_nnnn_gggg_eeee_))))_;;;;
- _...._...._...._dddd_oooo _ssss_oooo_mmmm_eeee_tttt_hhhh_iiii_nnnn_gggg _uuuu_ssss_eeee_ffff_uuuu_llll _hhhh_eeee_rrrr_eeee_...._...._....
- _}}}}
- _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______ffff_iiii_nnnn_iiii_ssss_hhhh_((((_cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee_))))_;;;;
-
- xxxxllllaaaatttteeee PPPPrrrroooodddduuuucccceeeerrrr IIIInnnntttteeeerrrrffffaaaacccceeee
- The xlate producer interface is used by transforming applications (like
- _c_o_r_d(1) and _p_i_x_i_e(1)) to register the transformations so other tools
- (like _d_b_x(1)) can, at execution time, use the CCCCoooonnnnssssuuuummmmeeeerrrr IIIInnnntttteeeerrrrffffaaaacccceeee to help
- the tool user understand the transformed text.
-
- This example records a trivial transformation and gets back the
- transformed bytes.
-
- _iiii_nnnn_tttt _rrrr_eeee_ssss_uuuu_llll_tttt_;;;;
- _xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______cccc_oooo_nnnn _cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee _==== _0000_;;;;
- _xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______pppp_rrrr_oooo _pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee _==== _0000_;;;;
- _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______pppp_rrrr_oooo______iiii_nnnn_iiii_tttt_((((_&&&&_pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee_,,,,_xxxx_llll_aaaa_tttt_eeee______tttt_kkkk______gggg_eeee_nnnn_eeee_rrrr_aaaa_llll_,,,,_cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee_,,,,
- _////_****_iiii_ssss_6666_4444_bbbb_iiii_tttt_==== _****_////_0000_))))_;;;;
- _////_**** _tttt_hhhh_eeee _ssss_iiii_nnnn_gggg_llll_eeee _tttt_rrrr_aaaa_nnnn_ssss_ffff_oooo_rrrr_mmmm_aaaa_tttt_iiii_oooo_nnnn _****_////
- _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______pppp_rrrr_oooo______aaaa_dddd_dddd______rrrr_aaaa_nnnn_gggg_eeee_((((_pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee_,,,,_nnnn_eeee_wwww_pppp_cccc_,,,,_nnnn_eeee_wwww_rrrr_aaaa_nnnn_gggg_eeee_,,,,
- _oooo_llll_dddd_pppp_cccc_,,,, _oooo_llll_dddd_rrrr_aaaa_nnnn_gggg_eeee_))))_;;;;
- _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______pppp_rrrr_oooo______dddd_iiii_ssss_kkkk______hhhh_eeee_aaaa_dddd_eeee_rrrr_((((_pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee_,,,,
- _XXXX_LLLL_AAAA_TTTT_EEEE______PPPP_RRRR_OOOO______SSSS_TTTT_AAAA_NNNN_DDDD_AAAA_RRRR_DDDD______SSSS_EEEE_TTTT_UUUU_PPPP_,,,,
- _&&&&_tttt_oooo_tttt_aaaa_llll_mmmm_eeee_mmmm_oooo_rrrr_yyyy_,,,, _&&&&_nnnn_uuuu_mmmm_bbbb_llll_oooo_cccc_kkkk_ssss_))))_;;;;
- _ffff_oooo_rrrr_((((_iiii _==== _0000_;;;; _iiii _<<<< _nnnn_uuuu_mmmm_bbbb_llll_oooo_cccc_kkkk_ssss_;;;; _++++_++++_iiii_))))
- _{{{{
- _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______pppp_rrrr_oooo______dddd_iiii_ssss_kkkk______nnnn_eeee_xxxx_tttt______bbbb_llll_oooo_cccc_kkkk_((((_pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee_,,,,
- _&&&&_dddd_aaaa_tttt_aaaa_,,,,_&&&&_dddd_aaaa_tttt_aaaa_ssss_iiii_zzzz_eeee_))))_;;;;
- _////_**** _dddd_oooo _ssss_oooo_mmmm_eeee_tttt_hhhh_iiii_nnnn_gggg _wwww_iiii_tttt_hhhh _dddd_aaaa_tttt_aaaa_ssss_iiii_zzzz_eeee _bbbb_yyyy_tttt_eeee_ssss _aaaa_tttt _aaaa_dddd_dddd_rrrr_eeee_ssss_ssss _dddd_aaaa_tttt_aaaa _****_////
- _ffff_rrrr_eeee_eeee_((((_dddd_aaaa_tttt_aaaa_))))_;;;;
- _}}}}
- _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______pppp_rrrr_oooo______ffff_iiii_nnnn_iiii_ssss_hhhh_((((_pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee_))))_;;;;
-
- You must install the _c_o_m_p_i_l_e_r__e_o_e._h_d_r._i_n_t_e_r_n_a_l subsystem to get the
- headers necessary to work with the xlate functions and leb128 functions
- they call.
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555)))) LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555))))
-
-
-
- FILES
- /usr/include/libXlate.h
- /usr/include/cmplrs/xlate.h
- /usr/include/elf.h
- /usr/include/dwarf.h
- /usr/include/libdwarf.h
- /usr/lib/libelfutil.a
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- xlate(4), xlate_init_fd(3e), xlate_pro_init(3e)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-